export const schema = {
    type: "page",
    title: "提现历史",
    body: [
        {
            type: "crud",
            api: "/api/cash/history",
            panelClassName: "no-border no-shadow bg-white",
            toolbarInline: true,
            columnsTogglable: true,
            columns: [
                {
                    label: "申请提款日期",
                    name: "created_at"
                },
                {
                    label: "订单数",
                    name: "order_count"
                },
                {
                    name: "amount",
                    label: "总额",
                },
                {
                    label: "手续费",
                    name: 'transfer_fee'
                },
                // {
                //     label: "银行转账手续费",
                //     name: 'contacts_phone'
                // },

                {
                    label: "提款总额",
                    name: "apply_amount",
                },
                {
                    label: "申请状态",
                    name: 'verify_status',
                    type: "map",
                    map: {
                        "0": "<span class='label label-warning'>待审核</span>",
                        "1": "<span class='label label-success'>审核通过</span>",
                        "2": "<span class='label label-default'>审核不通过</span>",
                        "*": "${status}"
                    }
                },
                // {
                //     label: "收款账号",
                //     // type: "json",
                //     name: 'recive_info'
                // },

                {
                    type: "operation",
                    label: "收款账号",
                    width: 180,
                    buttons: [
                        {
                            type: "button",
                            size: "xs",
                            label: "查看",
                            level: "info",
                            actionType: "dialog",
                            dialog: {
                                disabled: true,
                                title: "收款账号信息",
                                body: `
                                <div class="text-center" style="overflow: auto;">
                                    <div class="form-group form-item form-item-static">
                                        <label class="col-sm-5 control-label">户名</label>
                                        <div class="col-sm-7">
                                            <div class="form-control-static"><%= data.recive_info ? data.recive_info.bank_card_account : '-' %></div>
                                        </div>
                                    </div>
                                    <div class="form-group form-item form-item-static">
                                        <label class="col-sm-5 control-label">账号</label>
                                        <div class="col-sm-7">
                                            <div class="form-control-static"><%= data.recive_info ? data.recive_info.bank_card_num : '-' %></div>
                                        </div>
                                    </div>
                                    <div class="form-group form-item form-item-static" >
                                        <label class="col-sm-5 control-label">开户银行</label>
                                        <div class="col-sm-7">
                                            <div class="form-control-static"><%= data.recive_info ? data.recive_info.bank_company : '-' %></div>
                                        </div>
                                    </div>
                                    <div class="form-group form-item form-item-static" >
                                        <label class="col-sm-5 control-label">开户支行</label>
                                        <div class="col-sm-7">
                                            <div class="form-control-static"><%= data.recive_info ? data.recive_info.bank_branch : '-' %></div>
                                        </div>
                                    </div>
                                    <div class="form-group form-item form-item-static" >
                                        <label class="col-sm-5 control-label">开户行地址</label>
                                        <div class="col-sm-7">
                                            <div class="form-control-static"><%= data.recive_info ? data.recive_info.bank_card_open_addr : '-' %></div>
                                        </div>
                                    </div>
                                </div>
                            `
                            }
                        }],
                },

                {
                    label: "提款用途",
                    name: 'apply_msg'
                },

                {
                    label: "管理人员备注",
                    name: 'verify_msg'
                },

                {
                    label: "订单人员明细",
                    type: "operation",
                    width: 180,
                    buttons: [
                        {
                            type: "button",
                            size: "xs",
                            level: "info",
                            label: "查看",
                            actionType: "link",
                            link: "/finance/order/list?cash_apply_id=${id}"
                        },
                    ],
                }
            ]
        }
    ]
};
